<%= yield %>
<% if flash[:notice] %>
<script>
flash_message("<%=flash[:notice]%>")
</script>
<% end %>
<% if flash[:error] %>
<script>
flash_message("<%=escape_javascript(flash[:error])%>")
</script>
<% end %>